<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp_lib/init.jsp"%>
<!DOCTYPE html>
<html>
<head>
<title>权限管理</title>
<jsp:include page="/WEB-INF/jsp/common/common.jsp" />
<jsp:include page="/WEB-INF/jsp_lib/extjs.jsp" />

<script type="text/javascript">
	Ext.onReady(function() {
		Ext.create('Ext.form.Panel', {
			title : 'Upload a Photo',
			width : 400,
			bodyPadding : 10,
			frame : true,
			renderTo : Ext.getBody(),
			items : [ {
				xtype : 'filefield',
				name : 'photo',
				fieldLabel : 'Photo',
				labelWidth : 50,
				msgTarget : 'side',
				allowBlank : false,
				anchor : '100%',
				buttonText : 'Select Photo...'
			} ],

			buttons : [ {
				text : 'Upload',
				handler : function() {
					var form = this.up('form').getForm();
					if (form.isValid()) {
						form.submit({
							url : '${path}/rest/upload.htm',
							waitMsg : 'Uploading your photo...',
							success : function(fp, o) {
								Ext.Msg.alert('Success', 'Your photo "' + o.result + '" has been uploaded.');
							}
						});
					}
				}
			} ]
		});
	});
</script>
</head>
<body>

</body>
</html>